package cn.tedu.sp04.feign;

import cn.tedu.sp01.pojo.Item;
import cn.tedu.sp01.web.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(name = "item-service") //设置调用的服务
public interface ItemClient {
    @GetMapping("/{orderId}")
        //设置调用的路径
    JsonResult<List<Item>> getItems(@PathVariable String orderId);

    @GetMapping("/decreaseNumber")
    JsonResult<?> decreaseNumber(@RequestParam List<Item> items);
}
